package entity

import (
	"shqsoft.cn/pas3ui/base"
)

type Permission struct {
	ID                 int    `gorm:"primary_key;column:ID"`
	PermissionNo       string `gorm:"column:PermissionNo"`
	PermissionName     string `gorm:"column:PermissionName"`
	ParentPermissionId int    `gorm:"column:ParentPermissionId"`
	PermissionType     string `gorm:"column:PermissionType"`
	SortNo             int    `gorm:"column:SortNo"`
	IsUse              bool   `gorm:"column:IsUse"`
}

//TableName Role 角色表名
func (Permission) TableName() string {
	return "t_Permission"
}

func PermissionEF() base.EntityFunc {
	return func() interface{} {
		entity := Permission{}
		return &entity
	}
}
func PermissionESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []Permission
		return &entities
	}
}

func init() {
	base.DaoPoolObj.Put("Permission", base.NewDefaultDao(PermissionEF(), PermissionESF(), nil, "my"))
}
